home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / DB_CLIPP / 2614.ZIP / CLDOS.ZIP / CLDOS.TXT < prev    next >
Text File  |  1990-12-06  |  4KB  |  147 lines

  1. I provide this library for use as is -- to any who want it.
  2. I carry a major greavance in regards to the numerous files I have downloaded
  3. which hinted at the solution to a problem only to find that what I had just
  4. spent 1/2 downloading was a demo -- a partial version -- etc.  I wrote these
  5. functions to address a need in my applications as well as out curriosity --
  6. they have served me well.  This version of CLDOS.LIB was created for use
  7. with Clipper 5.0.  These functions have been tested on machines ranging from
  8. standalone 8086 to networked 386s.  I haven't had any problems with them and
  9. as of this writting all known bugs have been addressed -- which is of course
  10. not to say that there aren't any lurking around -- just none that I know of.
  11. Enjoy!
  12.         Brent Farmer   71621,627
  13.  
  14. CLDOS Function descriptions
  15. -----------------------------------------------------------------------------
  16. FUNCTION: numdir(<expC>)
  17.  
  18. ARGUMENTS:
  19. <expC> is the desired path
  20.  
  21. RETURNS:
  22. an integer indicating the number of matches.
  23.  
  24. DESCRIPTION:
  25. Returns number of subdirectories (excluding .. and .)  
  26. which match the specified dos search path.                      
  27.  
  28. EXAMPLE CALL:
  29. matches = numdir("\*.*")
  30.  
  31. -----------------------------------------------------------------------------
  32. FUNCTION: isdrive(<expN>)
  33.  
  34. ARGUMENTS:
  35. <expN> is an integer which coresponds to the drive to test
  36.        Drive number 0..25 (0=A:,1=B:,2=C:,etc.)
  37.  
  38. RETURNS:
  39. Logical value .T. or .F.
  40.  
  41. DESCRIPTION:
  42. This function checks for the existance of a physical, logical, or
  43. mapped drive.
  44.  
  45. -----------------------------------------------------------------------------
  46. FUNCTION: getdrive()
  47.  
  48. ARGUMENTS:
  49. none.
  50.  
  51. RETURNS:
  52. integer indicating the current drive number (0=A:,1=B:,2=C:, ...).
  53.  
  54. DESCRIPTION:
  55. This function returns the current drive number.
  56.  
  57. -----------------------------------------------------------------------------
  58. FUNCTION: setdrive(<expN>)
  59.  
  60. ARGUMENTS:
  61. <expN> is an integer which coresponds to the drive number to set.
  62.        Drive number 0..25 (0=A:,1=B:,2=C:,etc.)
  63.  
  64. RETURNS:
  65. Logical value .T. or .F.
  66.  
  67. DESCRIPTION:
  68. This function sets the active drive.
  69.  
  70. -----------------------------------------------------------------------------
  71. FUNCTION: drives()
  72.  
  73. ARGUMENTS:
  74. none.
  75.  
  76. RETURNS:
  77. <expC> a string of valid drive letters.
  78.  
  79. DESCRIPTION:
  80. This function returns a string of all physical, logical, and mapped drives.
  81.  
  82. -----------------------------------------------------------------------------
  83. FUNCTION: tempfile()
  84.  
  85. ARGUMENTS:
  86. none.
  87.  
  88. RETURNS:
  89. <expC> temporary file name.
  90.  
  91. DESCRIPTION:
  92. This function creates a uniquely named file in the current directory.
  93.  
  94. -----------------------------------------------------------------------------
  95. FUNCTION: dir_list(<Char>)
  96.  
  97. ARGUMENTS:
  98. <Char> Letter indicating the drive to scan.
  99.  
  100. RETURNS:
  101. <Array> A sorted array of all directory entries on the scanned drive.
  102.  
  103. DESCRIPTION:
  104. This function returns a sorted list of all directories on a specified drive.
  105.  
  106. EXAMPLE:
  107. array_of_dir = dir_list("C")
  108.  
  109. -----------------------------------------------------------------------------
  110. FUNCTION: dirchange(<expC>)
  111.  
  112. ARGUMENTS:
  113. <expC> DOS pathname.
  114.  
  115. RETURNS:
  116. Logical value .T. or .F.
  117.  
  118. DESCRIPTION:
  119. change the current directory.
  120.  
  121. -----------------------------------------------------------------------------
  122. FUNCTION: dirmake(<expC>)
  123.  
  124. ARGUMENTS:
  125. <expC> DOS pathname.
  126.  
  127. RETURNS:
  128. Logical value .T. or .F.
  129.  
  130. DESCRIPTION:
  131. make a new directory.
  132.  
  133. -----------------------------------------------------------------------------
  134. FUNCTION: dirremove(<expC>)
  135.  
  136. ARGUMENTS:
  137. <expC> DOS pathname.
  138.  
  139. RETURNS:
  140. Logical value .T. or .F.
  141.  
  142. DESCRIPTION:
  143. remove the specified directory.
  144.  
  145. -----------------------------------------------------------------------------
  146.  
  147.